//
//  QXAdHandler.h
//  iAccountBook
//
//  Created by 侯伟 on 2021/9/5.
//

#import <Foundation/Foundation.h>
#import "QXConfig.h"

NS_ASSUME_NONNULL_BEGIN

@class QXAdvert;
 // 请求响应block
typedef void (^AdTypeResponse)(ADChannel channel);

typedef void (^AdvertResponse)(QXAdvert* _Nullable ad);


@interface QXAdHandler : NSObject

+ (QXAdHandler*)shareHander;

/// 获取广告渠道
/// @param adType 类型
/// @param block 回调
- (void)requestAdChannelWithAdType:(ADType)adType block:(AdTypeResponse)block;

/// 获取自由广告
/// @param adType 类型
/// @param block 回调
- (void)requestQXAdWithAdType:(ADType)adType block:(AdvertResponse)block;


/// 自有广告点击回调
- (void)selfAdClickCallBack:(NSString*)url;

/// 自有广告显示回调
- (void)selfAdShowCallBack:(NSString*)url;


/// 广告回调
- (void)adCallBackAdType:(ADType)adType config:(QXConfig*)config type:(NSInteger)type;

@end

NS_ASSUME_NONNULL_END
